import axios from 'axios'

export const http_gitee = axios.create({
  baseURL: 'https://gitee.com/api/v5/gists'
})

/**
 * 请求拦截
 */
http_gitee.interceptors.request.use(
  (config) => {
    return config
  },
  (error) => {
    return Promise.reject(error)
  }
)

/**
 * 响应拦截
 */
http_gitee.interceptors.response.use(
  (response) => {
    return response.data
  },
  (error) => {
    return Promise.reject(error)
  }
)
